<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>预定义常量</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="inotify.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ref.inotify.html">Inotify 函数</a></div>
 <div class="up"><a href="book.inotify.html">Inotify</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="inotify.constants" class="appendix">
  <h1>预定义常量</h1>

  <p class="simpara">下列常量由此扩展定义，且仅在此扩展编译入 PHP 或在运行时动态载入时可用。</p>
  <dl>

   <strong class="title">Inotify constants usable with <span class="function"><a href="function.inotify-add-watch.html" class="function">inotify_add_watch()</a></span> and/or returned by <span class="function"><a href="function.inotify-read.html" class="function">inotify_read()</a></span></strong>
   
    <dt id="constant.in-access">
     <strong><code>IN_ACCESS</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      File was accessed (read) (*)
     </span>
    </dd>

   
   
    <dt id="constant.in-modify">
     <strong><code>IN_MODIFY</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      File was modified (*)
     </span>
    </dd>

   
   
    <dt id="constant.in-attrib">
     <strong><code>IN_ATTRIB</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Metadata changed (e.g. permissions, mtime, etc.) (*)
     </span>
    </dd>

   
   
    <dt id="constant.in-close-write">
     <strong><code>IN_CLOSE_WRITE</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      File opened for writing was closed (*)
     </span>
    </dd>

   
   
    <dt id="constant.in-close-nowrite">
     <strong><code>IN_CLOSE_NOWRITE</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      File not opened for writing was closed (*)
     </span>
    </dd>

   
   
    <dt id="constant.in-open">
     <strong><code>IN_OPEN</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      File was opened (*)
     </span>
    </dd>

   
   
    <dt id="constant.in-moved-to">
     <strong><code>IN_MOVED_TO</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      File moved into watched directory (*)
     </span>
    </dd>

   
   
    <dt id="constant.in-moved-from">
     <strong><code>IN_MOVED_FROM</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      File moved out of watched directory (*)
     </span>
    </dd>

   
   
    <dt id="constant.in-create">
     <strong><code>IN_CREATE</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      File or directory created in watched directory (*)
     </span>
    </dd>

   
   
    <dt id="constant.in-delete">
     <strong><code>IN_DELETE</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      File or directory deleted in watched directory (*)
     </span>
    </dd>

   
   
    <dt id="constant.in-delete-self">
     <strong><code>IN_DELETE_SELF</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Watched file or directory was deleted
     </span>
    </dd>

   
   
    <dt id="constant.in-move-self">
     <strong><code>IN_MOVE_SELF</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Watch file or directory was moved
     </span>
    </dd>

   
   
    <dt id="constant.in-close">
     <strong><code>IN_CLOSE</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Equals to IN_CLOSE_WRITE | IN_CLOSE_NOWRITE
     </span>
    </dd>

   
   
    <dt id="constant.in-move">
     <strong><code>IN_MOVE</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Equals to IN_MOVED_FROM | IN_MOVED_TO
     </span>
    </dd>

   
   
    <dt id="constant.in-all-events">
     <strong><code>IN_ALL_EVENTS</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Bitmask of all the above constants
     </span>
    </dd>

   
   
    <dt id="constant.in-unmount">
     <strong><code>IN_UNMOUNT</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      File system containing watched object was unmounted
     </span>
    </dd>

   
   
    <dt id="constant.in-q-overflow">
     <strong><code>IN_Q_OVERFLOW</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Event queue overflowed (wd is -1 for this event)
     </span>
    </dd>

   
   
    <dt id="constant.in-ignored">
     <strong><code>IN_IGNORED</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Watch was removed (explicitly by <span class="function"><a href="function.inotify-rm-watch.html" class="function">inotify_rm_watch()</a></span>
      or because file was removed or filesystem unmounted
     </span>
    </dd>

   
   
    <dt id="constant.in-isdir">
     <strong><code>IN_ISDIR</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Subject of this event is a directory
     </span>
    </dd>

   
   
    <dt id="constant.in-onlydir">
     <strong><code>IN_ONLYDIR</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Only watch pathname if it is a directory (Since Linux 2.6.15)
     </span>
    </dd>

   
   
    <dt id="constant.in-dont-follow">
     <strong><code>IN_DONT_FOLLOW</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Do not dereference pathname if it is a symlink (Since Linux 2.6.15)
     </span>
    </dd>

   
   
    <dt id="constant.in-mask-add">
     <strong><code>IN_MASK_ADD</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Add events to watch mask for this pathname if it already exists
      (instead of replacing mask).
     </span>
    </dd>

   
   
    <dt id="constant.in-oneshot">
     <strong><code>IN_ONESHOT</code></strong>
      (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
      Monitor pathname for one event, then remove from watch list.
     </span>
    </dd>

   
  </dl>

  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    The events marked with an asterisk (*) above can occur for files in watched
    directories.
   </span>
  </p></blockquote>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="inotify.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ref.inotify.html">Inotify 函数</a></div>
 <div class="up"><a href="book.inotify.html">Inotify</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
